<%@ Page Language="c#" MasterPageFile="~/MasterPopup.master" AutoEventWireup="true"
    Inherits="TeamTime.Login" StylesheetTheme="Default" Title="TeamTime - Login"
    CodeBehind="Login.aspx.cs" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:ScriptManager runat="server" ID="sm1" EnablePartialRendering="true">
    </asp:ScriptManager>
    <%--<clib:UpdatePanelExtender runat="server" ID="up1" UpdateMode="Conditional">
        <ContentTemplate>--%>
    <%-- <table cellspacing="0" cellpadding="0" border="0" style="border-style: none;" align="center" width="120px">
                <tr>
                    <td align="center">--%>
    <div style="width: 0px; margin: 0 auto;">
        <asp:Panel ID="pnlLoginForm" runat="server" SkinID="Panel" Style="border-style: none;
            position: relative; left: -100px;" DefaultButton="btnLogin">
            <table cellspacing="0" cellpadding="0" border="0" style="border-style: none;" width="120px">
                <tr>
                    <td align="left">
                        <img alt="spacer" longdesc="spacer" src="App_Themes/Default/Images/spacer.gif" style="height: 100px;
                            width: 0px;" />
                        <div id="header">
                        </div>
                        <td align="left">
                            &nbsp;
                        </td>
                </tr>
                <tr>
                    <td align="left">
                        <asp:Label ID="lblLoginCode" runat="server"><Br />Login</asp:Label>
                    </td>
                </tr>
                <tr>
                    <td align="left">
                        <asp:TextBox ID="LoginCode" runat="server" Width="200px"></asp:TextBox>
                        &nbsp;
                        <asp:RequiredFieldValidator ID="Requiredfieldvalidator1" runat="server" ControlToValidate="LoginCode"
                            ErrorMessage="* Required" ValidationGroup="Login" Display="Dynamic"></asp:RequiredFieldValidator>
                        <asp:RequiredFieldValidator ID="Requiredfieldvalidator3" runat="server" ControlToValidate="LoginCode"
                            ErrorMessage="* Required" ValidationGroup="PasswordReminder" Display="Dynamic"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td align="left">
                        <asp:Label ID="lblPassword" runat="server">Password</asp:Label>
                    </td>
                </tr>
                <tr>
                    <td align="left">
                        <asp:TextBox ID="Password" runat="server" Width="200px" TextMode="Password"></asp:TextBox>
                        &nbsp;
                        <asp:RequiredFieldValidator ID="Requiredfieldvalidator2" runat="server" ControlToValidate="Password"
                            ErrorMessage="* Required" ValidationGroup="Login" Display="Dynamic"></asp:RequiredFieldValidator>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Button ID="btnLogin" runat="server" Text="Login" CssClass="Button" OnClick="btnLogin_Click"
                            ValidationGroup="Login"></asp:Button>
                    </td>
                </tr>
                <tr>
                    <td>
                        <br />
                        <asp:Label ID="lblMsg" runat="server" Width="400px" Style="border-style: none; position: relative;
                            left: 0px;"></asp:Label>
                        <br />
                    </td>
                </tr>
                <tr>
                    <td>
                        Forgotten your password?
                        <asp:LinkButton ID="lnkForgotPassword" runat="server" Text="Click here to have a reminder sent."
                            ValidationGroup="PasswordReminder" OnClick="lnkForgotPassword_Click"></asp:LinkButton>
                    </td>
                </tr>
                <tr id="trp0" runat="server" visible="false">
                    <td>
                        <asp:Label ID="Label1" runat="server">New Password</asp:Label>
                    </td>
                </tr>
                <tr id="trp1" runat="server" visible="false">
                    <td>
                        <asp:TextBox ID="txtPassword1" runat="server" Height="18px" Width="70px" TextMode="Password"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="reqvalPassword1" runat="server" ControlToValidate="txtPassword1"
                            ErrorMessage="* Required" Display="Dynamic" ValidationGroup="NewPassword"></asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator ID="RegExpValPassword1" runat="server" ControlToValidate="txtPassword1"
                            ErrorMessage="The password must consist of at least 6 letters or numbers" ValidationExpression="\w{6,}"
                            Width="423px" Display="Dynamic" ValidationGroup="NewPassword"></asp:RegularExpressionValidator>
                    </td>
                </tr>
                <tr id="trp2" runat="server" visible="false">
                    <td>
                        <asp:Label ID="Label2" runat="server">Confirm Password</asp:Label>
                    </td>
                </tr>
                <tr id="trp3" runat="server" visible="false">
                    <td>
                        <asp:TextBox ID="txtPassword2" runat="server" Height="18px" Width="70px" TextMode="Password"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="reqvalPassword2" runat="server" ControlToValidate="txtPassword2"
                            ErrorMessage="* Required" Display="Dynamic" ValidationGroup="NewPassword"></asp:RequiredFieldValidator>
                        <asp:CompareValidator ID="ComValPassword2" runat="server" ControlToValidate="txtPassword2"
                            ErrorMessage="The Confirm Password must be identical to the New Password" ControlToCompare="txtPassword1"
                            Display="Dynamic" ValidationGroup="NewPassword"></asp:CompareValidator>
                    </td>
                </tr>
                <tr id="trp4" runat="server" visible="false">
                    <td>
                        <asp:Button ID="btnSave" runat="server" Text="Save" CssClass="Button" OnClick="btnSave_Click"
                            ValidationGroup="NewPassword"></asp:Button>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Panel ID="pnlPasswordReminder" runat="server" Visible="false">
                            <table>
                                <tr>
                                    <td>
                                    </td>
                                    <td>
                                    </td>
                                </tr>
                            </table>
                        </asp:Panel>
                    </td>
                </tr>
            </table>
        </asp:Panel>
        <asp:Panel ID="pnlPasswords" runat="server" Visible="False" DefaultButton="btnSave"
            SkinID="Panel" Style="border-style: none; position: relative; left: -100px;">
            <table cellspacing="0" cellpadding="0" border="0" style="border-style: none;" align="center">
            </table>
        </asp:Panel>
    </div>
    <%--    </td>
                </tr>
            </table>--%>
    </ContentTemplate> </clib:UpdatePanelExtender>

    <script type="text/javascript">
        function FocusControl(ctrlID) {
            var ctrl = document.getElementById(ctrlID);
            if (ctrl != null) {
                //alert(ctrl.id);
                ctrl.focus();
            }
        }
        //FocusControl('<%=txtPassword1.ClientID%>');
        FocusControl('<%=LoginCode.ClientID%>');
    </script>

</asp:Content>
